using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;

namespace ThridGroup.ERP.DTO
{
    /// <summary>
    /// 物料分类DTO
    /// </summary>
    public class MaterialTypeDto : EntityDto<int>
    {
        /// <summary>
        /// 分类名称
        /// </summary>
        public string MaterialTypeName { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 父级名称
        /// </summary>
        public string ParentName { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Index { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 子节点列表
        /// </summary>
        public List<MaterialTypeDto> Children { get; set; } = new List<MaterialTypeDto>();

        /// <summary>
        /// 是否有子节点
        /// </summary>
        public bool HasChildren => Children != null && Children.Count > 0;
    }
} 